package antempire.control;

import java.io.IOException;

import org.anddev.andengine.audio.sound.Sound;
import org.anddev.andengine.audio.sound.SoundFactory;
import org.anddev.andengine.ui.activity.BaseGameActivity;
import org.anddev.andengine.util.Debug;

public class GameSound {
	private Sound CoinFly;
	private Sound LauchWater;

	public void create(BaseGameActivity activity)
	{
		SoundFactory.setAssetBasePath("mfx/");
		try {		
			this.CoinFly = SoundFactory.createSoundFromAsset(activity.getSoundManager(), activity, "CoinFly.ogg");
			this.LauchWater = SoundFactory.createSoundFromAsset(activity.getSoundManager(), activity, "LauchWater.ogg");

		} catch (final IOException e) {
			Debug.e(e);
		}
	}
	
	public void coinFly()
	{
		this.CoinFly.play();
	}
	
	public void lauchWater()
	{
		this.LauchWater.play();
	}
	
	public float getVolume() {
		return this.LauchWater.getVolume();
	}
	
	public void setVolume(float volume)
	{
		this.CoinFly.setVolume(volume);
		this.LauchWater.setVolume(volume);
	}

}
